package com.cn.aam.checaiduo.ui.more.adapter;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;

import com.cn.aam.checaiduo.R;
import com.cn.aam.checaiduo.base.adapter.BaseRecycerAdapter;
import com.cn.aam.checaiduo.base.adapter.holder.BaseRecyclerViewHolder;
import com.cn.aam.checaiduo.bean.InfoOfDetailB;

import butterknife.BindView;


/**
 * @author 微木森林
 * @time 2017/6/1 下午3:16
 * @description 帮助中心，详情item
 * @remark
 */
public class HelpCenterDetailAdapter extends BaseRecycerAdapter<InfoOfDetailB> {


    public HelpCenterDetailAdapter(Context mContext) {
        super(mContext);
    }

    //item
    @Override
    protected BaseRecyclerViewHolder getViewHolder(View picNewsView) {
        return new ItemViewHolder(picNewsView);
    }

    @Override
    protected int getItemLayoutRes() {
        return R.layout.list_item_help_center_detail;
    }


    @Override
    protected void ItemVIewChange(BaseRecyclerViewHolder recyclerholder, final int position) {
        final ItemViewHolder myholder = (ItemViewHolder) recyclerholder;
        final InfoOfDetailB item = getItem(position);
        myholder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (onItemClick != null) onItemClick.onClick(position);
            }
        });
        //key
        myholder.tvTitle.setText(item.getKey());
    }


    //Item
    class ItemViewHolder extends BaseRecyclerViewHolder {
        @BindView(R.id.tv_title)
        TextView tvTitle;


        ItemViewHolder(View view) {
            super(view);
        }
    }


}